<?
include_once 'include/include.php';
c_create::createClass('adv');
$adv = new adv();
$outvar[headline] = '广告类目管理';
if ($_POST){
	if ($adv->submitTypeRecord($_POST)){
		$_SESSION[showtips]	 = $adv->action.'成功！';
	}else {
		assignMore($new->error);
		$_SESSION[showtips]	 = $adv->action.'失败！';
	}
}elseif ($_GET[id]){
	$_POST = $adv->getOneType($_GET[id]);
}elseif ($_GET[did]){
	if ($adv->deleteTypeRecord($_GET[did])){
		$_SESSION[showtips]	 = '删除成功！';
	}
}
if ($_POST[Cid]){
	$outvar[headline] = '新闻类目修改';
}
assignMore($_POST);
$outvar[record] = $adv->getTypeRecord(1);
outFile("adv_catalog");
?>